const path = require("path");
const TerserJSPlugin = require("terser-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");

const {merge} = require("webpack-merge");
const baseConfig = require("./base");

const config = merge(baseConfig, {
  mode: "production",
  optimization: {
    minimize:true,
    minimizer: [
      new TerserJSPlugin({
        cache: true,
        parallel: true,
      }), 
      new OptimizeCSSAssetsPlugin({}),
    ]
  }
});

module.exports = config;
